package demo.utils;

public final class ColorUtils {
    private ColorUtils() {

    }

    public static int getR(int color) {
        return (color)&0xFF;
    }

    public static int getG(int color) {
        return (color>>8)&0xFF;
    }

    public static int getB(int color) {
        return (color>>16)&0xFF;
    }

    public static int toRGB(int r, int g, int b) {
        int rgb = r;
        rgb = (rgb << 8) + g;
        return  (rgb << 8) + b;
    }
}
